package pers.wensheng.patterns.behavioral_pattern.observer_pattern.jdk_impl.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.util.Observable;
import java.util.Observer;

@Getter
@Setter
@AllArgsConstructor
public class Policemen implements Observer {


    private String name;

    /**
     *
     * @param o     the observable object.
     * @param arg   an argument passed to the {@code notifyObservers}
     *                 method.
     */
    @Override
    public void update(Observable o, Object arg) {

        System.out.println("捉到小偷了");
    }
}
